import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

export default new VueRouter({
	routes: [{
		path: '/monitor',
		name: 'task',
		component(resolve) {
			return require(['@comps/task/Main.vue'], resolve)
		},
		children: [{
			// 任务列表
			path: 'list/:typeId/:cateId',
			name: 'task_list',
			component(resolve) {
				return require(['@comps/task/TaskList.vue'], resolve)
			},
		}]
	}, {
		// 数据库
		path: '/db/list',
		name: 'db_list',
		component(resolve) {
			return require(['@comps/task/DBList.vue'], resolve)
		},
	}],
})